package com.caishi.lkx.user.service;

import com.caishi.lkx.user.model.PositionModel;
import com.zzw.common.entity.BaseService;
import com.zzw.common.service.NameService;
import com.zzw.common.service.service.ITreeModelService;
import com.caishi.lkx.user.model.re.UserPositionReModel;

import java.util.List;

/**
 * @author by keray
 * date:2021/4/20 9:53 上午
 */
public interface IPositionService extends BaseService<PositionModel, Long>, ITreeModelService<PositionModel, Long> , NameService<PositionModel, Long> {

    /**
     *<p>
     *   <h3>作者 keray</h3>
     *   <h3>时间： 2021/4/20 9:55 上午</h3>
     *   获取用户的下级职位
     *</p>
     * @param userId
     * @return <p> {@link List< PositionModel>} </p>
     * @throws
     */
    List<PositionModel> userNextLevelPosition(String userId);

    /**
     *<p>
     *   <h3>作者 keray</h3>
     *   <h3>时间： 2021/4/20 4:01 下午</h3>
     *   获取用户的职位
     *</p>
     * @param userId
     * @return <p> {@link List< PositionModel>} </p>
     * @throws
     */
    List<PositionModel> userHavePosition(String userId);


    void userSettingPosition(String userId, List<UserPositionReModel> positions);

    void userSettingPositionByIds(String userId, List<Long> positionIds);

    boolean codeHave(String code);

}
